home *** CD-ROM | disk | FTP | other *** search
/ Planet Source Code Jumbo …e CD Visual Basic 1 to 7 / 1_2002.ISO / Data / Zips / WinAPI Cla185664192001.psc / frmDemo.frm (.txt) next >
Encoding:
Visual Basic Form  |  2001-04-20  |  2.2 KB  |  59 lines

  1. VERSION 5.00
  2. Begin VB.Form frmDemo 
  3.    BorderStyle     =   3  'Fixed Dialog
  4.    Caption         =   "SilverSoft WINAPI Class Demonstrator by Akhil"
  5.    ClientHeight    =   2490
  6.    ClientLeft      =   45
  7.    ClientTop       =   330
  8.    ClientWidth     =   5235
  9.    Icon            =   "frmDemo.frx":0000
  10.    LinkTopic       =   "Form1"
  11.    MaxButton       =   0   'False
  12.    MinButton       =   0   'False
  13.    ScaleHeight     =   2490
  14.    ScaleWidth      =   5235
  15.    ShowInTaskbar   =   0   'False
  16.    StartUpPosition =   3  'Windows Default
  17.    Begin VB.CommandButton Command1 
  18.       Caption         =   "Send E-Mail to Akhil P (akhiljayaraj@hotmail.com)"
  19.       Height          =   375
  20.       Left            =   120
  21.       TabIndex        =   2
  22.       Top             =   2025
  23.       Width           =   5040
  24.    End
  25.    Begin VB.ListBox List1 
  26.       Height          =   1620
  27.       Left            =   2640
  28.       TabIndex        =   1
  29.       Top             =   135
  30.       Width           =   2520
  31.    End
  32.    Begin VB.CommandButton cmdFind 
  33.       Caption         =   "Find all files in C:\"
  34.       Height          =   315
  35.       Left            =   135
  36.       TabIndex        =   0
  37.       Top             =   150
  38.       Width           =   2355
  39.    End
  40. Attribute VB_Name = "frmDemo"
  41. Attribute VB_GlobalNameSpace = False
  42. Attribute VB_Creatable = False
  43. Attribute VB_PredeclaredId = True
  44. Attribute VB_Exposed = False
  45. Option Explicit
  46. Dim clsWinApi As CWinAPI 'Declare a class variable
  47. Private Sub cmdFind_Click()
  48. Dim FileCount As Integer, DirCount As Integer
  49. clsWinApi.FindFilesAPI "c:\", "*.*", FileCount, DirCount, List1.hWnd, False, True
  50. MsgBox "No. of Files Found: " & FileCount, , "WINAPI Class Demonstrator"
  51. End Sub
  52. Private Sub Command1_Click()
  53. clsWinApi.SendEmail "akhiljayaraj@hotmail.com", Me.hWnd
  54. End Sub
  55. Private Sub Form_Load()
  56. Set clsWinApi = New CWinAPI 'This makes a new instance of the class
  57. MsgBox "This program just demonstrates two functions that can be done with the CWinApi class and how to use it. You will be able to use other functions with no difficulties. The CWinApi class will be very useful for any programmer.", vbApplicationModal + vbInformation + vbOKOnly, "WINAPI class Demonstrator"
  58. End Sub
  59.